﻿namespace Shop.Entity
{
    /// <summary>
    /// 统一接口Json返回结果格式
    /// </summary>
    public class ResultModel 
    {
        public ResultModel()
        {
            error_msg = string.Empty;
            code = OperationResultType.Success;
            success = false;
            data = null;
        }

        /// <summary>
        /// 状态码
        /// </summary>
        public OperationResultType code { get; set; }

        /// <summary>
        /// 附加消息
        /// </summary>
        public string error_msg { get; set; }

        /// <summary>
        /// 成功失败
        /// </summary>
        public bool success { get; set; }

        /// <summary>
        /// 附加数据
        /// </summary>
        public object data { get; set; }
    }
}